

package org.come.until;

import com.tool.btn.DazaoBtn;
import java.math.BigDecimal;
import javax.swing.Icon;
import org.come.Frame.ForgeJframe;
import org.come.Frame.ZhuFrame;
import org.come.Jpanel.ForgeJpanel;
import org.come.entity.Goodstable;
import org.come.mouslisten.TransmuteMouslisten;
/**
 * 合成配方
 * 
 * @author Administrator
 * 
 */
public class SynthesisFormulation {
    private static SynthesisFormulation synthesisFormulation;

    static {
        getSynthesisFormulation();
    }

    public SynthesisFormulation() {
    }

    public static SynthesisFormulation getSynthesisFormulation() {
        if (synthesisFormulation == null) {
            synthesisFormulation = new SynthesisFormulation();
        }

        return synthesisFormulation;
    }
    /**
     * 判断调用那个合成方法
     */
    public static void type(String type, TransmuteMouslisten transmuteMouslisten) {
        if (type != null) {
            if ("我要合成仙器".equals(type)) {
                synthesisFormulation.GoodItem_1(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if ("我要升级仙器".equals(type)) {
                synthesisFormulation.GoodItem_2(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if ("我要洗炼仙器".equals(type)) {
                synthesisFormulation.GoodItem_33(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if ("我要重铸仙器".equals(type)) {
                synthesisFormulation.GoodItem_3(transmuteMouslisten, TransmuteMouslisten.goods2);
            }else if ("改变仙器模型".equals(type)) {
                synthesisFormulation.GoodItem_34(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if ("打造11级以上高级装备".equals(type)) {
                synthesisFormulation.GoodItem_4(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if ("我要打造普通装备".equals(type)) {
                synthesisFormulation.GoodItem_5(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if ("我要升级神兵".equals(type)) {
                synthesisFormulation.GoodItem_6(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if ("我要合成炼妖石".equals(type)) {
                synthesisFormulation.GoodItem_7(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if ("我要培养饰品".equals(type)) {
                synthesisFormulation.GoodItem_9(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if ("我要重铸饰品".equals(type)) {
                synthesisFormulation.GoodItem_10(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if ("我要解封神饰".equals(type)) {
                synthesisFormulation.GoodItem_35(transmuteMouslisten, TransmuteMouslisten.goods2);
            }else if ("我要合成符石".equals(type)) {
                synthesisFormulation.GoodItem_11(transmuteMouslisten, TransmuteMouslisten.goods4);
            } else if ("我要洗练符石".equals(type)) {
                synthesisFormulation.GoodItem_12(transmuteMouslisten, TransmuteMouslisten.goods3);
            } else if (type.equals("封印兽魂")) {
                synthesisFormulation.GoodItem_20(transmuteMouslisten, TransmuteMouslisten.goods2);
            }  else if (type.equals("洗练兽魂属性")) {
                synthesisFormulation.GoodItem_21(transmuteMouslisten, TransmuteMouslisten.goods2);
            }  else if (type.equals("提升兽灵等级")) {
                synthesisFormulation.GoodItem_22(transmuteMouslisten, TransmuteMouslisten.goods2);
            } else if (!"我要上神兵石".equals(type) && !"炼化神兵".equals(type)) {
                if ("我要培养护身符".equals(type)) {
                    synthesisFormulation.GoodItem_15(transmuteMouslisten, TransmuteMouslisten.goods2);
                } else if ("我要重铸护身符".equals(type)) {
                    synthesisFormulation.GoodItem_16(transmuteMouslisten, TransmuteMouslisten.goods2);
                } else if ("炼化仙器".equals(type)) {
                    synthesisFormulation.GoodItem_17(transmuteMouslisten, TransmuteMouslisten.goods2);
                } else if ("培养彩晶石".equals(type)) {
                    synthesisFormulation.GoodItem_18(transmuteMouslisten, TransmuteMouslisten.goods2);
                } else if ("精炼神兵".equals(type)) {
                    synthesisFormulation.GoodItem_19(transmuteMouslisten, TransmuteMouslisten.goods2);
                }
            } else {
                synthesisFormulation.GoodItem_14(transmuteMouslisten, TransmuteMouslisten.goods2);
            }
        }

    }

 // 根据不同的类型调用不同的合成方法
 //TODO 我要合成仙器
    public void GoodItem_1(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (type == 7099) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (Goodtype.GodEquipment_xian(type)) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon((Icon)null);
        }

    }
//TODO 我要升级仙器
    public void GoodItem_2(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (type == 7099) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (Goodtype.Ore(type)) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon((Icon)null);
        }

    }
//TODO 我要重铸仙器
    public void GoodItem_3(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.GodEquipment_xian(type)) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (type == 212) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon((Icon)null);
        }

    }
  //TODO 我要洗炼仙器
    public void GoodItem_33(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (type==923){
                GoodItem_34(transmuteMouslisten,goods);
                return;
            }
            if (Goodtype.GodEquipment_xian(type)) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (type == 915) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon((Icon)null);
        }

    }

    public void GoodItem_34(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.GodEquipment_xian(type)) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (type == 923) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }



    public void GoodItem_4(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.OrdinaryEquipment(type)) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (Goodtype.Ore(type)) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon((Icon)null);
        }

    }

    public void GoodItem_5(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.OrdinaryEquipment(type)) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (Goodtype.Ore(type)) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon((Icon)null);
        }

    }

    public void GoodItem_6(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.GodEquipment_God(type)) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (Goodtype.Ore(type)) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon((Icon)null);
        }

    }
//TODO 炼妖石合成
    public void GoodItem_7(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.ExerciseMonsterOre(type) && goods[0] == null) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (Goodtype.ExerciseMonsterOre(type) && goods[0].getType() == type && goods[0] != goodstable) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon((Icon)null);
        }

    }

    public void GoodItem_9(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.Accessories(type) && goods[0] == null) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (type == 1008L || Goodtype.Accessories(type) && goods[0] != goodstable) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon((Icon)null);
        }

    }

    public void GoodItem_10(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.Accessories(type) && goods[0] == null) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (Goodtype.Ore(type)) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }
    //TODO 我解封神饰
    public void GoodItem_35(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.Accessories(type)&&goods[0] == null) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (type == 932) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }


    /** 我要合成符石 */
    public void GoodItem_11(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (type != 188) {
                return;
            }
            int k = 0;

            int i;
            for(i = goods.length - 1; i >= 0; --i) {
                if (goods[i] == null) {
                    k = i;
                } else if (goodstable == goods[i]) {
                    return;
                }
            }

            if (k == 0) {
                i = DazaoBtn.Numerical(Goodtype.StringParsing(goodstable.getValue())[0]);
                transmuteMouslisten.getRuneOperateJpanel().setMoney(new BigDecimal(1000000 * i));
            }

            TransmuteMouslisten.goods4[k] = goodstable;
            transmuteMouslisten.getRuneOperateJpanel().getGoodsListLabel()[26 + k].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
        } else {
            TransmuteMouslisten.goods4[transmuteMouslisten.getGoodPlace() - 26] = null;
            transmuteMouslisten.getRuneOperateJpanel().getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }

    public void GoodItem_12(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (type != 188) {
                return;
            }

            int k = 0;

            for(int i = goods.length - 1; i >= 0; --i) {
                if (goods[i] == null) {
                    k = i;
                } else if (goodstable == goods[i]) {
                    return;
                }
            }

            if (k == 0) {
                transmuteMouslisten.getRuneOperateJpanel().setMoney(new BigDecimal(1000000));
            }

            TransmuteMouslisten.goods3[k] = goodstable;
            transmuteMouslisten.getRuneOperateJpanel().getGoodsListLabel()[24 + k].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
        } else {
            TransmuteMouslisten.goods3[transmuteMouslisten.getGoodPlace() - 24] = null;
            transmuteMouslisten.getRuneOperateJpanel().getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }

    private void GoodItem_14(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.GodEquipment_God(type)) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (type == 191) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }

    private void GoodItem_15(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.Amulet2(type) && goods[0] == null) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (Goodtype.Amulet2(type) && goodstable != goods[0]) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }

    private void GoodItem_16(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.Amulet2(type) && goods[0] == null) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (Goodtype.Ore(type)) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }
  //仙器炼化
    private void GoodItem_17(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.GodEquipment_xian(type) && goods[0] == null) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            }else if (Goodtype.GodEquipment_Ding(type) && goods[0] == null) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (type == 7005 || Goodtype.GodEquipment_xian(type) || Goodtype.GodEquipment_Ding(type)  && goodstable != goods[0]) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }

    private void GoodItem_18(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (type == 729 && goods[0] == null) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (type == 729 && goodstable != goods[0]) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }

    private void GoodItem_19(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.GodEquipment_God(type) && goods[0] == null) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (Goodtype.GodEquipment_God(type) && goodstable != goods[0]) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }
    private void GoodItem_20(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (Goodtype.GodEquipment_God(type) || Goodtype.GodEquipment_xian(type)) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
            } else if (type == 60007) {
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            } else{
                ZhuFrame.getZhuJpanel().addPrompt2("请放入(神兵或者仙器)和兽魂！");
                return;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }
    private void GoodItem_21(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (type == 60007) {
                forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[0] = goodstable;
                if(TransmuteMouslisten.goods2[1]!=null) {
                    if(TransmuteMouslisten.goods2[1].getType() == 60008) {
                        if(TransmuteMouslisten.goods2[0].getSbjljd()>=5) {
                            ZhuFrame.getZhuJpanel().addPrompt2("#Y兽魂最多可附灵5次，#G"+TransmuteMouslisten.goods2[0].getGoodsname()+"#Y已达上限！");
                            return;
                        }
                    }
                }

            } else if (type == 60008 || type == 60009) {
                if(type == 60008) {
                    if(TransmuteMouslisten.goods2[0]!=null) {
                        if(TransmuteMouslisten.goods2[0].getSbjljd()>=5) {
                            ZhuFrame.getZhuJpanel().addPrompt2("#Y兽魂最多可附灵5次，#G"+TransmuteMouslisten.goods2[0].getGoodsname()+"#Y已达上限！");
                            return;
                        }
                    }
                }
                forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                TransmuteMouslisten.goods2[1] = goodstable;
            } else{
                ZhuFrame.getZhuJpanel().addPrompt2("请放入兽魂和(兽魂精或者兽魂灵)！");
                return;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }
    private void GoodItem_22(TransmuteMouslisten transmuteMouslisten, Goodstable[] goods) {
        ForgeJpanel forgejpanel = ForgeJframe.getForgejframe().getForgejpanel();
        if (transmuteMouslisten.getGoodPlace() < 24) {
            Goodstable goodstable = GoodsListFromServerUntil.Getgood(transmuteMouslisten.getGoodPlace());
            long type = goodstable.getType();
            if (type == 60008) {
                String[] value =  goodstable.getValue().split("\\|");
                if(Integer.parseInt(value[0].split("=")[1])>=9) {
                    ZhuFrame.getZhuJpanel().addPrompt2("兽灵最高等级为9级！");
                    return;
                }
                if(TransmuteMouslisten.goods2[0]==null) {
                    if(TransmuteMouslisten.goods2[1]!=null) {
                        if(!TransmuteMouslisten.goods2[1].getValue().split("\\|")[0].split("=")[1].equals(goodstable.getValue().split("\\|")[0].split("=")[1]) || TransmuteMouslisten.goods2[1].getRgid().intValue()==goodstable.getRgid().intValue()) {
                            ZhuFrame.getZhuJpanel().addPrompt2("请放入同等级的兽灵！");
                            return;
                        }
                    }
                    forgejpanel.getGoodsListLabel()[24].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                    TransmuteMouslisten.goods2[0] = goodstable;
                }else {
                    if(TransmuteMouslisten.goods2[1]==null) {
                        if(TransmuteMouslisten.goods2[0]!=null) {
                            if(!goodstable.getValue().split("\\|")[0].split("=")[1].equals(TransmuteMouslisten.goods2[0].getValue().split("\\|")[0].split("=")[1]) || TransmuteMouslisten.goods2[0].getRgid().intValue()==goodstable.getRgid().intValue()) {
                                ZhuFrame.getZhuJpanel().addPrompt2("请放入同等级的兽灵！");
                                return;
                            }
                        }
                    }
                    forgejpanel.getGoodsListLabel()[25].setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 49, 49));
                    TransmuteMouslisten.goods2[1] = goodstable;
                }
            } else{
                ZhuFrame.getZhuJpanel().addPrompt2("请放入兽灵！");
                return;
            }
        } else {
            TransmuteMouslisten.goods2[transmuteMouslisten.getGoodPlace() - 24] = null;
            forgejpanel.getGoodsListLabel()[transmuteMouslisten.getGoodPlace()].setIcon(null);
        }

    }
}
